﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Windows.Forms;
using ESRI.ArcGIS.ArcMapUI;


namespace ODM_AddIn
{
    public class AddOptFuelsDataButton : ESRI.ArcGIS.Desktop.AddIns.Button
    {

        public AddOptFuelsDataButton()
        {
        }

        protected override void OnClick()
        {
            if (ODM_Code.rUtils.CheckInit())
            {
                IMxDocument doc = ArcMap.Application.Document as IMxDocument;
                //ODM_Code.Forms.AddOptFuelsDataForm aodf = new ODM_Code.Forms.AddOptFuelsDataForm(doc);
                ODM_Code.Forms.AddOptFuelsDataForm2 aodf = new ODM_Code.Forms.AddOptFuelsDataForm2(doc);
                aodf.ShowDialog();
                aodf.Activate();
                aodf.BringToFront();
            }
            else
            {
                MessageBox.Show("Please first select the analysis area by clicking the \"Select Analysis Area\" button.", "Missing Analysis Area Parameter");
            }
        }

        protected override void OnUpdate()
        {
        }
    }
}
